package com.hbx.eduservice.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author hbx
 * @Date 2023/10/21 15:13
 */
@Component
@FeignClient(name = "service-order",fallback = OrderFallback.class)
public interface OrderClient {

    /**
     * 根据课程id和用户id查询订单表中的订单状态
     * @param courseId
     * @param memberId
     * @return
     */
    @GetMapping("/eduorder/order/isBuyCourse/{courseId}/{memberId}")
    boolean isBuyCourse(@PathVariable("courseId") String courseId, @PathVariable("memberId") String memberId);
}
